package cn.qqncn.furniture.mapper;

import cn.qqncn.furniture.pojo.domain.Car;
import cn.qqncn.furniture.pojo.vo.CarVo;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface CarMapper {
    int deleteByPrimaryKey(Car car);

    int insert(Car record);

    int insertSelective(Car record);

    List<Car> selectByUserId(Integer userId);

    int updateByPrimaryKeySelective(Car record);

    /**
     * 修改购物车单个视频的数量
     * @param record
     * @return
     */
    int updateByPrimaryKey(Car record);

    /**
     * 查询该用户的购物车
     * @param userId
     * @return 购物车VO类
     */
    List<CarVo> selectAllByUserId(Integer userId);

    Car selectByPrimaryKey(Car cart);

    int deleteAllByUserId(Integer userId);
}